package org.jeecg.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 数据同步定时任务表
 * @Author: jeecg-boot
 * @Date: 2023-11-21
 * @Version: V1.0
 */
@Data
@TableName("lab_cron_job")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "lab_cron_job对象", description = "数据同步定时任务表")
public class LabCronJob implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**
     * 表名
     */
    @Excel(name = "表名", width = 15)
    @ApiModelProperty(value = "表名")
    private String tableName;
    /**
     * 操作行为
     */
    @Excel(name = "操作行为", width = 15)
    @ApiModelProperty(value = "操作行为")
    private String synFlag;
    /**
     * 执行条件
     */
    @Excel(name = "执行条件", width = 15)
    @ApiModelProperty(value = "执行条件")
    private String askTo;
    /**
     * 是否同步
     */
    @Excel(name = "是否同步", width = 15)
    @ApiModelProperty(value = "是否同步")//N:未同步;Y:已同步
    private String complete;

    //时间戳
    private Long timeStamp;

    private Integer orderNum;

    public LabCronJob() {
    }



    public LabCronJob(String tableName, String synFlag, Long timeStamp, Integer orderNum) {
        this.tableName = tableName;
        this.synFlag = synFlag;
//        this.complete = complete;
        this.timeStamp = timeStamp;
        this.orderNum = orderNum;
    }

    public LabCronJob(String tableName, String synFlag, String askTo, Long timeStamp) {
        this.tableName = tableName;
        this.synFlag = synFlag;
        this.askTo = askTo;
        this.timeStamp = timeStamp;

    }

    public LabCronJob(String tableName, String synFlag, String askTo, Long timeStamp, Integer orderNum) {
        this.tableName = tableName;
        this.synFlag = synFlag;
        this.askTo = askTo;
//        this.complete = complete;
        this.timeStamp = timeStamp;
        this.orderNum = orderNum;
    }
}
